import service from '@/utils/request'

//查询用户信息
export const useUserInfoApi = (name: any) => {
	return service.get('/user/findByName?name=' + name)
}

//获取登录用户的权限
export const findPermissions = (name: any) => {
	return service.get('/user/findPermissions?name=' + name)
}

//查询用户列表
export const findPage = (data: any) => {
	return service.post('/user/findPage', data)
}

//删除用户列表
export const deleteUser = (data: any) => {
	return service.post('/user/delete', data)
}

export const updatePasswordApi = (data: any) => {
	return service.put('/data/success.json', data)
}

export const useUserApi = (id: number) => {
	return service.get('/data/user/1.json')
}
